package com.gopay.common.domain.bank.route.po.pay;

import com.gopay.common.domain.BaseEntity;

import javax.persistence.*;
import java.util.Date;

/**
 * 付款路由-商户方案和规则关系
 * @author xj.x@hnair.com
 * @date 2018-04-16 16:06
 **/
@Entity
@Table(name = "pay_spec_solution_rule_rel")
public class PaySpecSolutionRuleRel extends BaseEntity {

    /**
     * 主键
     */
    private Integer relId;
    /**
     * 方案ID
     */
    private Integer solutionId;
    /**
     * 规则ID
     */
    private Integer ruleId;
    /**
     * 优先级 （数字越大优先级越高）
     */
    private Integer priority;
    /**
     * 删除标识 （0-未删除；1-已删除）
     */
    private String delFlag;
    /**
     * 创建标识
     */
    private Date createdTs;
    /**
     * 最后更新时间
     */
    private Date updatedTs;

    @Id
    @SequenceGenerator(name = "paySpecSoluRuleRelSeq", sequenceName = "PAY_SPEC_SOLU_RULE_REL_SEQ" ,allocationSize=1)
    @GeneratedValue(strategy = GenerationType.SEQUENCE, generator = "paySpecSoluRuleRelSeq")
    @Column(name = "REL_ID", unique = true, nullable = false)
    public Integer getRelId() {
        return relId;
    }

    public void setRelId(Integer relId) {
        this.relId = relId;
    }

    @Column(name = "SOLUTION_ID")
    public Integer getSolutionId() {
        return solutionId;
    }

    public void setSolutionId(Integer solutionId) {
        this.solutionId = solutionId;
    }

    @Column(name = "RULE_ID")
    public Integer getRuleId() {
        return ruleId;
    }

    public void setRuleId(Integer ruleId) {
        this.ruleId = ruleId;
    }

    @Column(name = "PRIORITY")
    public Integer getPriority() {
        return priority;
    }

    public void setPriority(Integer priority) {
        this.priority = priority;
    }

    @Column(name = "DEL_FLAG")
    public String getDelFlag() {
        return delFlag;
    }

    public void setDelFlag(String delFlag) {
        this.delFlag = delFlag;
    }

    @Column(name = "CREATED_TS", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getCreatedTs() {
        return createdTs;
    }

    public void setCreatedTs(Date createdTs) {
        this.createdTs = createdTs;
    }

    @Column(name = "UPDATED_TS", nullable = false)
    @Temporal(TemporalType.TIMESTAMP)
    public Date getUpdatedTs() {
        return updatedTs;
    }

    public void setUpdatedTs(Date updatedTs) {
        this.updatedTs = updatedTs;
    }
}
